package dk.modified.reshary;

public class SignupController {

	public static boolean ValidateEmail(String email) {
		return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();
	}

	public static boolean ValidateUsername(String username) {
		java.util.regex.Pattern p = java.util.regex.Pattern
				.compile("^[a-z0-9_-]{3,15}$");
		java.util.regex.Matcher m = p.matcher(username);
		return m.matches();
	}

	public static boolean ValidatePassword(String password) {
		if (password.length() >= 6) {
			return true;
		} else {
			return false;
		}
	}

	public static boolean ValidateRealname(String realname) {
		java.util.regex.Pattern p = java.util.regex.Pattern
				.compile("^[a-z0-9_-]{3,25}$");
		java.util.regex.Matcher m = p.matcher(realname);
		return m.matches();
	}

}
